<?php

namespace app\home\validate;

use think\Validate;

class Users extends Validate
{
    protected $rule =   [
        'role'  => 'require',
        'id'  => 'require',
        'phonenum'  => 'require',
        'pwd'  => 'require',
        'nickname'  => 'require',
        'code'  => 'require|length:6',
        'type'  => 'require',
        'jobs'  => 'require',
        'wechat_num'  => 'require',
        'tall'  => 'require',
        'age'  => 'require',
        'gender'  => 'require',
        'marriage'  => 'require',
        'hobby'  => 'require',
        'monologue'  => 'require',
        'address'  => 'require',
        'salary'  => 'require',
        'weight'  => 'require',
        'native_place'  => 'require',
        'education'  => 'require',
        'introduction'  => 'require',
        'honor'  => 'require',
        'headicon'  => 'require',
        'weight'  => 'require',
        'banks'  => 'require',
        'skills'  => 'require',
        'introduction'  => 'require',
        'honor'  => 'require',
        'taptype'  => 'require',
    ];

    protected $message  =   [
        'role.require' => '请选择角色',
        'id.require' => '用户id不能为空',
        'phonenum.require' => '手机号不能为空',
        'nickname.require' => '请输入昵称',
        'pwd.require' => '请输入密码',
        'code.require' => '请输入验证码',
        'code.length' => '请输入六位数的验证码',
        'type.require' => '请选择登录类型',
        'jobs.require' => '个人职业必填',
        'wechat_num.require' => '请填写微信号',
        'tall.require' => '请输入个人身高',
        'age.require' => '请输入年龄',
        'gender.require' => '请选择性别',
        'marriage.require' => '请选择婚姻状态',
        'hobby.require' => '请选择个人爱好',
        'monologue.require' => '请填写内心独白',
        'native_place.require' => '请填写户籍地',
        'address.require' => '请填写现居住地',
        'salary.require' => '请输入收入信息',
        'education.require' => '请输入学历',
        'introduction.require' => '请输入自我介绍',
        'honor.require' => '个人荣誉内容不能为空',
        'headicon.require' => '头像不能为空',
        'weight.require' => '请填写体重数据',
        'banks.require' => '请先绑定银行卡',
        'skills.require' => '请完善个人擅长内容',
        'introduction.require' => '请填写自我介绍',
        'honor.require' => '请填写个人获得荣誉',
        'taptype.require' => '缺少获取条件',

    ];

    protected $scene = [
        'list' => ['role'],
        'id' => ['ids'],
        'sendmsg' => ['phonenum'],
        'findpwd' => ['phonenum','pwd','code'],
        'registermarr' => ['phonenum','pwd','nickname','code','role','wechat_num','monologue','gender','address','salary','marriage','age','jobs'],
        'registertotur' => ['phonenum','pwd','nickname','code','role','wechat_num','gender','age','skills','introduction'],
        'loginpwd' => ['phonenum','pwd'],
        'logincode' => ['phonenum','code'],
        'taps' => ['taptype'],
        'follow' => ['role,id'],
        'getuserinfo' => ['uid'],


    ];
}
